load("//adev/shared-docs:defaults.bzl", "ts_project", "zoneless_jasmine_test")

ts_project(
    name = "unit_test_lib",
    testonly = True,
    srcs = glob([
        "*.spec.mts",
    ]),
    deps = [
        "//adev:node_modules/@types/jsdom",
        "//adev:node_modules/jsdom",
        "//adev:node_modules/marked",
        "//adev/shared-docs/pipeline/shared/marked",
        "//adev/shared-docs/pipeline/shared/marked/test:renderer_context",
    ],
)

zoneless_jasmine_test(
    name = "unit_tests",
    data = [
        ":unit_test_lib",
        "@rules_browsers//browsers/chromium",
    ],
    env = {
        "CHROME_HEADLESS_BIN": "$(CHROME-HEADLESS-SHELL)",
    },
    toolchains = ["@rules_browsers//browsers/chromium:toolchain_alias"],
)
